<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8" %>
<%@ include file="/admin/include/init_admin.jsp" %>
<%@ page import="com.joinhawaii.admin.product.*" %>
<%

	HashList code106	= CommonUtil.getCodeList("106");	//렌터회사



	HashMap infos = new HashMap();

	ProductDAO dao 	= new ProductDAO();
	HashList list 	= dao.selectGolfList(infos);



%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
	<title>조인하와이</title>
	<%@ include file="/admin/include/cssnjs.jsp"  %>
	<script type="text/javascript">
	$(document).ready(function() {

		$('#list').find('tr').hover(
				function () { $(this).addClass("hover"); }
			  , function () { $(this).removeClass("hover"); }
			)
			.click(function(){
				$('#golf_id').val($(this).attr('golf_id'));
				$('#searchForm').attr('action', './golfDetail.jsp');
				$('#searchForm').submit();
			});

	});


	function fnNew() {
		$('#golf_id').val('XXXXXX');
		$('#searchForm').attr('action', './golfDetail.jsp?job_type=C');
		$('#searchForm').submit();
	}

	</script>
</head>
<body>
<div id="wrap">
	<div id="top">
		<%@ include file="/admin/include/top.jsp" %>
	</div>
	<div id="page">
		<div id="menu">
			<%@ include file="/admin/include/leftMenu.jsp" %>
		</div>
		<div id="contents">
			<div class="menu_title">
				<h1>골프</h1>
				<p>관리자 > 상품관리 > <b>골프</b></p>
			</div>
			<div class="clear line_01"></div>

			<form id="searchForm" method="post" action="./golfList.jsp">
			<input type="hidden" name="golf_id" id="golf_id" value=""/>

			<div class="mt10 mb10 r">
				<input type="image" src="/images/admin/btn_search.gif" class="button"/>
				<a href="#nohref" onclick="fnNew()"><img src="/images/admin/btn_new.gif"></a>
			</div>

			</form>

			<div class="search_result">검색결과 : <%= list.size() %>건</div>

		    <table cellpadding="0" cellspacing="0" class="table_03">
				<colgroup>
					<col width="40px"/>
					<col width="100px"/>
					<col />
					<col width="100px"/>
					<col width="100px"/>
				</colgroup>
				<thead>
					<tr>
						<th><p>No</p></th>
						<th><p>코드</p></th>
						<th><p>골프장명</p></th>
						<th><p>정렬순서</p></th>
						<th><p>사용유무</p></th>
					</tr>
				</thead>
				<tbody id="list">
			<%	for (int i = 0; i < list.size(); i++) { %>
					<tr golf_id="<%= list.get("golf_id",i) %>">
						<td><%= i+1 %></td>
						<td><%= list.get("golf_id", i) %></td>
						<td class="l"><%= list.get("golf_name", i) %></td>
						<td><%= list.get("sort_flag", i) %></td>
						<td><%= list.get("use_yn", i) %></td>
					</tr>
			<%	} %>
				</tbody>
			</table>

		</div>
	</div>
</div>
</body>
</html>
